<!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 7) | !(IE 8)  ]><!-->
<html <?php language_attributes(); ?>>
    <!--<![endif]-->
    <head>
        <meta charset="<?php bloginfo('charset'); ?>" />
        <meta property="fb:app_id" content="653127101376621" />
        <title><?php wp_title('', true); ?></title>
        <link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico" />
        <!--[if lt IE 9]>
        <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
        <![endif]-->
        <?php
        wp_head();
        include_once('header_scripts.php');
        ?>
    </head>
    <body <?php body_class();?> >
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) return;
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=653127101376621";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));</script>
        <script>
            window.fbAsyncInit = function() {
                FB.init({
                appId : '653127101376621',
                status : true, // check login status
                cookie : true, // enable cookies to allow the server to access the session
                xfbml : true // parse XFBML
            });
            };
            (function() {
                var e = document.createElement('script');
                e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
                e.async = true;
                document.getElementById('fb-root').appendChild(e);
            }());
        </script>
        <div id="top-bg"></div>
        <div id="header" class="row-fluid">
            <div class="row-fluid">
                <div class="span3">
                    <a href="<?php echo esc_url( home_url( '/' ));?>" class="logo" title="Go to Finds Deal">
                        <?php
                            if ( function_exists( 'ot_get_option' ) ) {
                                $bg = ot_get_option('logo_head');
                                    if($bg && $bg['background-image']){ ?>
                                        <img src="<?php echo $bg['background-image'];?>" alt="Finds Deal"/>
                                   <?php }else{ ?>
                                        <img src="<?php echo get_stylesheet_directory_uri().'/img/FindsDeals.png';?>" alt="Finds Deal"/>
                                  <?php }
                                ?>
                             <?php }
                         ?>
                    </a>
                </div>
                <div class="right-header span9">
                    <div class="row-fluid search">
                        <!-- <div id="cart-menu" class="cart-menu">
                            <header id="masthead" class="site-header" role="banner">
                                <?php wp_nav_menu( array( 'theme_location' => 'menu_cart', 'menu_class' => 'nav-pills pull-right nav-ul' ) ); ?>
                            </header>
                        </div> -->
                        <form action="<?php echo home_url('/'); ?>">
                                <input type="text" name="s" placeholder="Search by store name or deal title"/>
                                <button id="btn_search" type="submit" class="text-transform">Search</button>
                        </form>

                                <?php
                                    $fb_page = get_option('fb_page');
                                    $gg_plus = get_option('gg_plus');
                                    $twitter = get_option('twitter');
                                    if($fb_page ==''){
                                        $fb_page = site_url();
                                    }
                                    if($gg_plus ==''){
                                        $gg_plus = site_url();
                                    }

                                ?>
                        <div class="social-network">
                                    <div class="social_net">
                                        <?php
                                            if($twitter !=''){ ?>
                                                <a href="<?php echo $twitter?>" class="twitter-follow-button" data-show-count="false" data-lang="en">Follow</a>
                                            <?php }else{ ?>
                                                <a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php echo site_url();?>" data-text="Finds Deals">Tweet</a>
                                            <?php }
                                        ?>
                                        <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],
                                            p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);
                                            js.id=id;js.src=p+'://platform.twitter.com/widgets.js';
                                            fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
                                        </script>
                                    </div>
                                    <div class="social_net">
                                        <div class='fb-like' data-href="<?php echo $fb_page?>"
                                             data-layout='button_count'
                                             data-send='false' data-show-faces='false'
                                             data-width='60'></div>
                                    </div>
                        </div>


                    </div>
                    <hr />
                    <div id="header-menu" class="row-fluid menu nav-menu">
                        <header id="masthead" class="site-header" role="banner">
                            <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-pills pull-right nav-ul' ) ); ?>
                            <?php $header_image = get_header_image();
                                  if ( ! empty( $header_image ) ) : ?>
                                  <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
                            <?php endif; ?>
                        </header>
                    </div>
                </div>
            </div>
            <?php if (is_active_sidebar('cs-body-head-sidebar')) dynamic_sidebar('cs-body-head-sidebar'); ?>
        </div>
        <div id="content" class="row-fluid">
            <div class="content-wrap">
                <div class="inner-content row-fluid">